<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <f:loadBundle basename="system.general.app" var="app" />
        <f:loadBundle basename="system.log.label_es" var="label" />
    </h:head>
    <h:body>
        <h:form>  
            <p:growl id="messages" showDetail="true"/>  
            <br/>
            <h:link value="Menu " outcome="/faces/page/menu/main.xhtml"/>
            <br/>

            <h:panelGrid columns="2" cellpadding="2">
                <h:outputText value="#{label.field1}"/>
                <h:inputText id="persona" value="#{system_log.persona}">
                </h:inputText>
                <h:outputText value="#{label.field2}"/>
                <h:selectOneMenu id="accion" value="#{system_log.accion}">
                    <f:selectItem itemLabel="      " itemValue="NULL"/>
                    <f:selectItem itemLabel="#{label.field7}" itemValue="INSERT"/>
                    <f:selectItem itemLabel="#{label.field8}" itemValue="UPDATE"/>
                    <f:selectItem itemLabel="#{label.field9}" itemValue="DELETE"/>
                </h:selectOneMenu>
                <h:outputText value="#{label.field3}"/>
                <h:inputText id="detalle" value="#{system_log.detalle}">
                </h:inputText>
                <h:outputText value="#{label.field4} #{label.field5}"/>
                <p:calendar value="#{system_log.fecha}" effect="slide" navigator="true" readonlyInput="true" pattern="yyyy-MM-dd" />
                <h:outputText value="#{label.field6}"/>
                <p:calendar value="#{system_log.fechaFinal}" effect="slide" navigator="true" readonlyInput="true" pattern="yyyy-MM-dd" />
            </h:panelGrid>

            <h:commandButton value="#{label.button1}" actionListener="#{system_log.find}" />  

            <h:dataTable var="logg" value="#{system_log.beans}" border="1" rendered="#{not empty log.beans}">
                <h:column>  
                    <h:outputText value="#{logg.persona}"/>
                </h:column>
                <h:column>  
                    <h:outputText value="#{logg.sql}"/>
                </h:column>
                <h:column>  
                    <h:outputText value="#{logg.fecha}"/>
                </h:column>
            </h:dataTable>
        </h:form>
    </h:body>
</html>